<?xml version="1.0" encoding="UTF-8"?>
<!--
To change this license header, choose License Headers in Project Properties.
To change this template file, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
    
    <ui:composition template="/resources/templates/default.xhtml">
        <ui:define name="title">Logs</ui:define>
        <ui:define name="titlePage">Logs</ui:define>
        <ui:define name="cssStyle"> 
            <style>                
                .divlogs-content{
                    border:1px solid gray;
                    border-radius: 5px;
                }
                
                .divlogs-suptitle .ui-panel-title{
                    font-size: 20px;
                    font-weight: bold;
                }
                
                .divlogs-title .ui-panel-title{
                    font-size: 16px;
                    font-weight: bold;
                }
            </style>
        </ui:define>
        <ui:define name="content">
            <h:form>
                <p:panel styleClass="divlogs-suptitle" header="Calendrier des logs">
                    <p:commandButton ajax="false" action="logs/topsite" value="Voir le top sites général">
                        
                    </p:commandButton>
                    <c:forEach var="lcdmonth" items="#{logsCalendarBean.logsCalendarMonths}">
                        <p:panel styleClass="divlogs-title" header="#{logsCalendarBean.getMonthNameOf(lcdmonth.monthLog)} #{lcdmonth.yearLog}">
                            <c:forEach var="lcday" items="#{logsCalendarBean.getLogsCalendarDates(lcdmonth)}">
                                <p:commandButton ajax="false" action="logs_day" value="#{lcday.dayLog}">
                                    <f:setPropertyActionListener target="#{logsBean.yearSelected}" value="#{lcday.yearLog}" />
                                    <f:setPropertyActionListener target="#{logsBean.monthSelected}" value="#{lcday.monthLog}" />
                                    <f:setPropertyActionListener target="#{logsBean.daySelected}" value="#{lcday.dayLog}" />
                                    <f:setPropertyActionListener target="#{logsBean.viewSelected}" value="2" />
                                    <f:setPropertyActionListener target="#{logsBean.hourSelected}" value="-1" />
                                </p:commandButton>
                            </c:forEach>
                       </p:panel>
                    </c:forEach>
                </p:panel>
            </h:form>
        </ui:define>

    </ui:composition>
</html>
